import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/lanling";

// 查询列表
export function listPayBank(query) {
  return request({
    url: '/system/app/payBank/page',
    method: 'get',
    params: query
  })
}

export function payBankList(query) {
  return request({
    url: '/system/app/payBank/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getPayBank(id) {
  return request({
    url: '/system/app/payBank/' + parseStrEmpty(id),
    method: 'get'
  })
}

// 新增
export function addPayBank(data) {
  return request({
    url: '/system/app/payBank',
    method: 'post',
    data: data
  })
}

// 修改
export function updatePayBank(data) {
  return request({
    url: '/system/app/payBank',
    method: 'put',
    data: data
  })
}

// 状态修改
export function changeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/system/app/payBank/changeStatus',
    method: 'put',
    data: data
  })
}

// 删除
export function delPayBank(id) {
  return request({
    url: '/system/app/payBank/' + id,
    method: 'delete'
  })
}


